斗地主发牌器

import random

#定义54张牌
huase = ['\u2665','\u2660','\u2666','\u2663']
num = ['A','2','3','4','5','6','7','8','9','10','J','Q','K']
kings = ['大王','小王']

#一副牌
for i in huase:
for el in num:
kings.append(i+el)

#乱序
random.shuffle(kings)

#发牌
person1 = kings[0:17]
person2 = kings[17:34]
person3 = kings[34:51]
dipai = kings[51:]
print(person1)
print(person2)
print(person3)
print(dipai)
posted @ 2019-03-30 12:07  编程小白ZJX  阅读(533)  评论(0编辑  收藏  举报